/*
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2025-07-16 23:34:16
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2025-07-17 00:11:02
 * @FilePath: /medical-companion-app/src/api/service.api.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { request, METHOD } from "@/service/http.service";

export function getIdentityList(params = {}) {
  return request({
    url: "/identities",
    method: METHOD.GET,
    params
  }).then(({ data }) => data);
}


export function getIdentityDetail(pk) {
  return request({
    url: `/identities/${pk}`,
    method: METHOD.GET,
  }).then(({ data }) => data);
}


export function createIdentity(serviceData) {
  return request({
    url: "/identities/create",
    method: METHOD.POST,
    data: serviceData,
  }).then(({ data }) => data);
}


export function updateIdentity(pk, serviceData) {
  return request({
    url: `/identities/${pk}/update`,
    method: METHOD.PUT,
    data: serviceData,
  }).then(({ data }) => data);
}


export function deleteIdentity(pk) {
  return request({
    url: `/identities/${pk}/delete`,
    method: METHOD.DELETE,
  }).then(({ data }) => data);
}
